<?php
/**
 * 简历管理
 */

class Admin_Page_Euser extends Admin_Page_Abstract
{
    private $resumeDb;
    private function loadDb()
    {
        $this->resumeDb = Db_Resume::instance();
    }
    public function validate(ME_Request $input, ME_Response $output)
    {
        return true;
    }
    
    public function doDefault(ME_Request $input, ME_Response $output)
    {
        $page = (int)$input->get("page");
        $page = max(1,$page);
        $this->loadDb();
        $pageSize = 20;
        //获得所有记录
        $param = array(
                'db'          => $this->resumeDb,
                'fromSql'     => ' from resume_baseInfo ', #from部分的语句
                'orderBySql'  => ' order by uid desc ',
                'pagesize'  => $pageSize,
                'page'      => $page,
        );

        $listData = Libs_DBHelper::getList($param);
        $urlTpl = 'index.php?c=Resume&page={PAGE}';
		$pageCfg = array(
			'page' => $page,
			'rownum' => $pageSize,
			'target' => '_self',
			'total' => (int)$listData['allcnt'],
			'url' => $urlTpl,
		);

		$pageObj = new Libs_Page($pageCfg);
        $pageTpl = '{PREV:&lt;}{FIRST:[NUM]}{PREVHD:...}{BAR:[NUM]:9:4}{NEXTHD:<span>...</span>}{LAST:[NUM]}{NEXT:&gt;}';
        $output->pageBar = '共有：'.(int)$listData['allcnt'] .' &nbsp; '.$pageObj->display($pageTpl);

        $output->list = $listData['list'];

        $output->setTemplate("Resume");
    }



}
